public class TestDemo {

    public static void main(String[] args) {
        //String转int
        String str = "37";
        int num1 = Integer.valueOf(str);
        System.out.println(num1+1);

        int num2 = Integer.parseInt(str);
        System.out.println(num2);
    }

    public static void main4(String[] args) {
        //int转String
        int num = 21;
        String str1 = num + "";
        System.out.println(str1);
        String str2 = String.valueOf(num);
        System.out.println(str2);
    }

    public static void main3(String[] args) {
        String str1 = "frost";
        String str2 = "cold";
        System.out.println(str1 + str2);

        int a = 10;
        int b = 20;
        System.out.println("a+b=" + a + b);
        System.out.println("a+b=" + (a+b));
    }


    public static void main2(String[] args) {
        int a = 1;
        int b = 2;
        System.out.println(a / b);

        System.out.println(a * 1.0 / b);

        double num = 1.1;
        System.out.println(num * num);
    }


    public static void main1(String[] args) {
        int a = 1;
        System.out.println(a);
    }
}
